import Mock from 'mockjs';

export default {
  'GET /api/admin/system/users': Mock.mock({
    success: 1,
    message: '@paragraph',
    data: {
      'items|10': [
        {
          'id|+1': 1,
          username: '@word(10)',
          nickname: '@cword(5)',
          remark: '@cword(64)',
          last_login_time: '@datetime',
          created_at: '@datetime',
        },
      ],
    },
  }),

  'GET /api/admin/system/users/:id': Mock.mock({
    success: 1,
    message: '@paragraph',
    data: {
      'id|+1': 1,
      username: '@word(10)',
      nickname: '@cword(6)',
      remark: '@cword(32)',
      last_login_time: '@datetime',
      created_at: '@datetime',
    },
  }),

  'POST /api/admin/system/users': Mock.mock({
    success: 1,
    message: '@paragraph',
  }),

  'PUT /api/admin/system/users/1': Mock.mock({
    success: 1,
    message: '@paragraph',
  }),

  'DELETE /api/admin/system/users/1': Mock.mock({
    success: 1,
    message: '@paragraph',
  }),

  'GET /api/admin/system/permissions': Mock.mock({
    success: 1,
    message: '@paragraph',
    data: {
      'items|10': [
        {
          'id|+1': 1,
          name: '@word(10)',
          title: '@cword(3, 10)',
        },
      ],
    },
  }),
};
